package view;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.JTextPane;
import javax.swing.ButtonGroup;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ReportWindow extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private final ButtonGroup buttonGroup = new ButtonGroup();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			ReportWindow dialog = new ReportWindow();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public ReportWindow() {
		setBounds(100, 100, 369, 220);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel label = new JLabel("\u0422\u0438\u043F \u043E\u0442\u0447\u0435\u0442\u0430:");
			label.setBounds(10, 11, 61, 14);
			contentPanel.add(label);
		}
		
		JRadioButton radioButton = new JRadioButton("\u0413\u043E\u0434\u043E\u0432\u043E\u0439");
		buttonGroup.add(radioButton);
		radioButton.setBounds(6, 32, 109, 23);
		contentPanel.add(radioButton);
		
		JRadioButton rdbtnPfGjcktlybqVtczw = new JRadioButton("За последний месяц");
		buttonGroup.add(rdbtnPfGjcktlybqVtczw);
		rdbtnPfGjcktlybqVtczw.setBounds(6, 58, 166, 23);
		contentPanel.add(rdbtnPfGjcktlybqVtczw);
		
		JTextPane textPane = new JTextPane();
		textPane.setBounds(6, 88, 337, 50);
		contentPanel.add(textPane);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("\u0421\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("\u041E\u0442\u043C\u0435\u043D\u0430");
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						setVisible(false);
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}
}
